{include file='_header.tpl'}

<h3>Редактирование доп.данных для<br>
{if $ddfor==1}
    фильма <i>{$filmInfo["filmName"]}</i>
{else}
    раздачи <i>"{$filmInfo["filmName"]}" {$distrTypes[$distrInfo["type"]]}</i>
{/if}
</h3>

{if $ddfor==1}
    <a href="{$SCRIPT_URL}&a={$ACTIONS_KINOPOISK_PAGE_LIST}">К списку фильмов</a>
{else}
    <a href="{$SCRIPT_URL}&a={$ACTIONS_DISTR_LIST}&filmid={$filmInfo["id"]}">К раздачам фильма {$filmInfo["filmName"]}</a>
{/if}
<hr />
<form method="post" action="{$SCRIPT_URL}&a={$ACTIONS_DD_FORM}&for={$ddfor}&id={$ddid}&action=form">
    <table border="0">
        {foreach from=$formFields item=row}
        <tr>
            <td>{$row->fld_title}</td>
            <td>
                {if     $row->fld_type == 1}
                    <input type="text" name="{$row->fld_name}" value="{$formData[$row->fld_name]}" />
                {elseif $row->fld_type == 2}
                    <textarea name="{$row->fld_name}">{$formData[$row->fld_name]}</textarea>
                {/if}
            </td>
        </tr>
        {/foreach}
        <tr><td colspan="2"><center><input type="submit" /></center></td></tr>
    </table>
</form>

{include file='_footer.tpl'}